﻿<%@ Page Title="我的消息" Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master" AutoEventWireup="true" CodeBehind="MessageList.aspx.cs" Inherits="ZLCMS.Web.Wap.Member.MessageList" %>


<%@ Register Src="/wap/shop/Footer.ascx" TagName="Footer" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="/wap/shop/js/rem.js"></script>
    <script type="text/javascript" src="/wap/shop/js/clamp.min.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">
    <!--S page -->
        <div data-role="page" id="mypage" class="MessageList">

            <!--S content -->
            <div data-role="main" class="ui-content">
                <div class="refundTop">
                    <a href="javascript:void(0)" onclick="history.back()" data-ajax="false"><img src="/wap/shop/images/arrowLeftCom.png" /></a>
                    我的消息
                </div>

                <ul class="listview">

                </ul>
            </div>
            <!--E content -->

            <!--S footer -->
            <div data-role="footer" data-position="fixed" data-tap-toggle="false">
                <uc1:Footer ID="Footer1" runat="server" MenuId="M" />
            </div>
            <!--E footer -->
        </div>
    <!--E page -->
    <script type="text/javascript">
        $(function () {
            //多行省略
            var paragraph = document.getElementsByClassName('text');
            for (var i = 0; i < paragraph.length; i++) {
                $clamp(paragraph[i], { clamp: 2 });
            }
        })
    </script>


    
     <script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            var handler = $('.listview').listviewHandler();
            handler.initialize({
                loaderBtn: $('#btnMore'), //加载数据按钮（点击加载下一页）
                emptyHtml: '<div style="text-align: center; font-size: 12px; color:#666; margin-top:2em">-- 暂无记录 --</div>', //无记录时显示此html
                itemTemplate: ' <li>' +
                        '<a data-ajax="false" href="/wap/member/messagedetail.aspx?id={Id}" class="ui-btn">' +
                            '<h2><b>{Title}{ReadTag}</b> <span><i>{CreateTime}</i></span></h2>' +
                           // '<img src="/wap/shop/images/msgList-img2.png" alt="Alternate Text" />' +
                            '<p class="text">{Content}</p>' +
                        '</a>' +
                    '</li>', //项模板
                pageIndex: 1, //页码（从1起算）
                pageSize: 20, //页大小
                totalCount: 999, //总记录数
                itemHandler: function (data, itemTemplate, container) {//数据各项处理
                    if (data.Status == '0') { data.ReadTag = '<i></i>'; }
                    else { data.ReadTag = ''; }

                    return itemTemplate.format(data);
                },
                command: 'Member.LoadMessageList',
                parameter: { Kind: '<%=Request["k"] %>' }
            });
            handler.nextPage();
        })
    </script>
</asp:Content>
